/************************************************************************
 * AudioLog class declaration
 *
 * (c) Robert Bosch GmbH, CR/AEH
 *
 *	$RCSfile$
 *	$Revision: 3671 $
 *	$Date: 2007-02-27 11:20:42 +0800 (Tue, 27 Feb 2007) $
 *	Author: CR/AEH-Steffens
*************************************************************************/


#ifndef AUDIOLOGGER_H
#define AUDIOLOGGER_H

//#include <windows.h>
#include "AudioFormat.h"

class AudioLogger {

public:
	AudioLogger(AudioFormat format);
	virtual ~AudioLogger();

	bool				createLogFile(const char* szLogFileName, int sessionID);
	void				writeBufferToFile(void* pBuffer, unsigned long ulBufSize);
	void				closeLogFile(void);
	inline int			getSessionID(void)	{	return m_sessionID;		}
	inline std::string	getLogFile(void)	{	return m_logFileName;	}

protected:

    _IO_FILE* 		m_hLogFile;
	unsigned long   m_ulBufferLength;
	AudioFormat		m_format;
	void			writeHeader();
	int				m_sessionID;
	std::string		m_logFileName;
};

#endif //AUDIOLOGGER_H
